Skip to main content

IRealtimeRef<T>

IRealtimeRef<T>

Manages a networked reference to a component, and is aware of the referenced component's network lifecycle.

Events

didChange

event OnRealtimeRefDidChange<T> didChange

Invoked when the [Normal.Realtime.IRealtimeRef`1.value](Normal.Realtime.IRealtimeRef`1#value) or [Normal.Realtime.IRealtimeRef`1.state](Normal.Realtime.IRealtimeRef`1#state) changes.

valueDidChange

event OnRealtimeRefValueDidChange<T> valueDidChange

Invoked when the [Normal.Realtime.IRealtimeRef`1.value](Normal.Realtime.IRealtimeRef`1#value) changes.

Properties

value

T value { get; set; }

The referenced component, or null if it couldn't be resolved.

Use to be notified whenever this changes.

state

RefState state { get; }

The current state of this reference.